package eco2automotive.gui.components;
import javax.swing.*;
import java.awt.*;
/** 
 * JPanel, display the Log Information 
  * @version 1.0
  * @autor Fco. Javier Sánchez Esparza
 */

public class Panel_INFOLOG extends JPanel{  
      private JScrollPane panelScroll;
      private JTextArea info;           
      
      public Panel_INFOLOG(){  
      info= new JTextArea("Log...");                  
      info.setRows(5);      
                 
      panelScroll = new JScrollPane( info );            
      panelScroll.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
      panelScroll.setBorder(new javax.swing.border.TitledBorder("Log Info"));                           
      setLayout(new GridLayout(1,1,2,2));
    this.add(panelScroll);
      }
     /**
      * 
      * @param i
      */
     public void updateInfo(String i){this.info.append(i);}
      /**
       * 
       */
      public void clearInfo(){this.info.setText("");}
}
